<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments :: head('登入页面')"></head>
<body class="background show-spinner no-footer">
<div class="fixed-background"></div>
<main>
    <div class="container">
        <div class="row h-100">
            <div class="col-12 col-md-10 mx-auto my-auto">
                <div class="card auth-card">
                    <div class="position-relative image-side ">

                        <p class=" text-white h2">欢迎使用SGL BLOG</p>

                        <p class="white mb-0">
                            请使用您的账号登入。
                            <br>如果您没有账号, 请
                            <a th:href="@{/user/register}"  class="white">注册</a>。
                        </p>
                    </div>
                    <div class="form-side">
                        <a th:href="@{/}">
                            <span class="logo-single"></span>
                        </a>
<!--                        <h6 class="mb-4">Login</h6>-->

                        <form th:action="@{/user/login}" method="post" class="needs-validation tooltip-label-right" novalidate>
                            <div class="form-group position-relative error-l-50">
                                <label>邮箱</label>
                                <input type="email" name="accountEmail" class="form-control" required>
                                <div class="invalid-tooltip">
                                    请输入邮箱！
                                </div>
                            </div>
                            <div class="form-group position-relative error-l-50">
                                <label>密码</label>
                                <input type="password" name="accountPassword" class="form-control" required>
                                <div class="invalid-tooltip">
                                    请输入密码！
                                </div>
                            </div>
                            <div class="d-flex justify-content-between align-items-center">
                                <a href="#">密码忘记了？</a>
                                <button class="btn btn-primary btn-lg btn-shadow" type="submit">登录</button>
                            </div>

                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>


</main>
<th:block th:replace="_fragments :: script" />
<script th:inline="javascript">
    let data = [[${msg}]];
    if (data == "0") {
        showNotification("top","提示","您的账号或密码有误，请重新输入！！！","danger")
    }else if (data == "1"){
        showNotification("top","提示","您还没有登录，请先登录","warning")
    }
</script>
</body>

</html>